Here, just paste this into GAME.CON at the bottom of the file.
var VAR1 0 0

appendevent EVENT_GAME

switch sprite[].picnum
        case SHELL
        case SHOTGUNSHELL
                getflorzofslope sprite[].sectnum sprite[].x sprite[].y VAR1
                sub VAR1 sprite[].z
                ifl VAR1 512
                ifg sprite[].statnum 2
                {
                        changespritestat THISACTOR 1
                        cstat 32
                        rand VAR1 256
                        sub VAR1 128
                        add VAR1 sprite[].ang
                        seta[].ang VAR1
                        fall
                }
        break
endswitch

endevent

You can add a sound in the block of code that changes the statnum and such. It uses the default movement, and shells will be deleted before hitting the ground if they bump into something first. Making them flat (cstat 32) is something I started doing a while back and it's a great for a small sprite on the ground because it allows for different angles.